package com.budwk.app.sqfwV2.enums;

import lombok.Getter;

/**
 * 世纪城场所类型
 */
@Getter
public enum CenturyCitySafePlaceTypeEnum {

    RESTAURANT("restaurant", "餐饮"),
    COSMETOLOGY("cosmetology", "美容美发"),
    HEALTH("health", "医疗"),
    SHOP("shop", "商店"),

    canteen("canteen", "人员密集-食堂"),
    ;

    private final String code;

    private final String name;


    CenturyCitySafePlaceTypeEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }


    /**
     * @param code
     * @return
     */
    public static String getName(String code) {
        for (CenturyCitySafePlaceTypeEnum o : CenturyCitySafePlaceTypeEnum.values()) {
            if (o.getCode().equals(code)) {
                return o.getName();
            }
        }
        return null;
    }

}
